let logger = require('pomelo-logger').getLogger(__filename);
let DateUtil = require("../../../utils/dateUtil");
let pomelo = require("pomelo");

module.exports = function () {
    return new Filter();
};

let Filter = function () {

};

Filter.prototype.before = function (msg, session, next) {
    if (pomelo.app.get("closing")) {
        logger.error("server is closing.......");
        next(null);
        return;
    }
    next(null);
};

Filter.prototype.after = function (err, msg, session, resp, next) {
    next(err);
};